﻿using System.Web.Mvc;
using System.Drawing;
using System.Drawing.Imaging;

namespace Mytrip.Users.Controllers
{
    public class CaptchaController:Controller
    {
        CaptchaRepository db = new CaptchaRepository();
        public void Image(int id, int id2, string id3)
        {
            string solution = string.Empty;
            Bitmap image = db.GenerateImage(id, id2, id3, out solution);
            Session["antibotimage"] = solution;
            image.Save(Response.OutputStream, ImageFormat.Png);
        }
    }
}
